﻿using System;
using System.ComponentModel;
using DataBase;

namespace DBService
{
	public abstract class DbObject : IDbObject
	{
		[Browsable(false)]
		public int Id
		{
			get
			{
				return this.mId;
			}
		}

		[Browsable(false)]
		public IDatabase Database
		{
			get
			{
				return this.mDatabase;
			}
		}

		public abstract void AddToDb(IDatabase db);

		public abstract void UpdateToDb();

		public abstract void RemoveFromDb();

		protected int mId;

		protected IDatabase mDatabase;
	}
}
